package com.xiangyang.controller;

import com.xiangyang.entity.dto.Result;
import com.xiangyang.entity.vo.EmployeeAndDepartment;
import com.xiangyang.service.impl.IEmployeeAndDepartmentImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/employees")
@CrossOrigin
public class EmplyoeeControllers {
    @Autowired
    IEmployeeAndDepartmentImpl ui;
    @PostMapping("/querystaffbydepartment")
    Result getEmployeeList(){
       return ui.selectEmployees();
    }

}
